
#ifndef	__FR_DEVICE_PMU_IO_H__
#define	__FR_DEVICE_PMU_IO_H__

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include "app_config.h"


/*********************
 *      DEFINES
 *********************/

#if BOARD_SEL == BOARD_EVB_FR5090

    #define BUTTON_PIN_NUM			PMU_PIN_7
    #define KEY2_PIN_NUM			PMU_PIN_6
    #define SOS_KEY_PIN_NUM			PMU_PIN_5
    #define KEY1_PIN_NUM			PMU_PIN_4
    #define ENCONDED_A_PIN_NUM 		PMU_PIN_2
    #define ENCONDED_B_PIN_NUM 		PMU_PIN_3

    #define  PMU_IO_INTTERUPT_DEFAULT	(BUTTON_PIN_NUM|SOS_KEY_PIN_NUM|KEY1_PIN_NUM|KEY2_PIN_NUM|ENCONDED_A_PIN_NUM|ENCONDED_B_PIN_NUM)

#elif BOARD_SEL == BOARD_EVB_FR3092E

    #define BUTTON_PIN_NUM			PMU_PIN_7
    #define SOS_KEY_PIN_NUM			PMU_PIN_5
    #define KEY1_PIN_NUM			PMU_PIN_4
    #define ENCONDED_A_PIN_NUM 		PMU_PIN_2
    #define ENCONDED_B_PIN_NUM 		PMU_PIN_3

    #define  PMU_IO_INTTERUPT_DEFAULT	(BUTTON_PIN_NUM|SOS_KEY_PIN_NUM|ENCONDED_A_PIN_NUM|ENCONDED_B_PIN_NUM)

#elif BOARD_SEL == BOARD_EVB_FR3092E_CM

    #define BUTTON_PIN_NUM			PMU_PIN_4
    #define SOS_KEY_PIN_NUM			PMU_PIN_5
    #define KEY1_PIN_NUM			PMU_PIN_3
    #define ENCONDED_A_PIN_NUM 		PMU_PIN_7
    #define ENCONDED_B_PIN_NUM 		PMU_PIN_6

    #define  PMU_IO_INTTERUPT_DEFAULT	(BUTTON_PIN_NUM|SOS_KEY_PIN_NUM|KEY1_PIN_NUM|ENCONDED_A_PIN_NUM|ENCONDED_B_PIN_NUM)
	
#elif BOARD_SEL == BOARD_EVB_FR3092E_RGB

    #if BOARD_VERSION == BOARD_V1_0
        #define BUTTON_PIN_NUM			PMU_PIN_7
        #define KEY2_PIN_NUM			PMU_PIN_6
        #define SOS_KEY_PIN_NUM			PMU_PIN_5
        #define KEY1_PIN_NUM			PMU_PIN_4
        #define ENCONDED_A_PIN_NUM 		PMU_PIN_2
        #define ENCONDED_B_PIN_NUM 		PMU_PIN_3
        #define  PMU_IO_INTTERUPT_DEFAULT	(BUTTON_PIN_NUM|SOS_KEY_PIN_NUM|KEY2_PIN_NUM|KEY1_PIN_NUM|ENCONDED_A_PIN_NUM|ENCONDED_B_PIN_NUM)
    #elif BOARD_VERSION == BOARD_V1_3
        #define BUTTON_PIN_NUM			PMU_PIN_0
        #define KEY2_PIN_NUM			PMU_PIN_2
        #define KEY1_PIN_NUM			PMU_PIN_3

        #define  PMU_IO_INTTERUPT_DEFAULT	(BUTTON_PIN_NUM|KEY2_PIN_NUM|KEY1_PIN_NUM)
    #else
    #error "choose correct board"
    #endif

#else
#error "choose correct board"
#endif

/**********************
 *      TYPEDEFS
 **********************/
 

/**********************
 *  STATIC PROTOTYPES
 **********************/


/**********************
 *  STATIC VARIABLES
 **********************/



/**********************
 *  VARIABLES
 **********************/



/**********************
 *      MACROS
 **********************/
 

//default Time zone
 

/**********************
 *   EXTERN FUNCTIONS
 **********************/

void device_pmu_io_init(void);

/**********************
 *   FUNCTIONS
 **********************/




#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif